//Loadable插件需使用Loading
import Loadable from 'react-loadable'  //React 性能优化 组件动态加载
import Loading from '@/components/Loading/index';

/*
	loader 为  页面组件路径
*/ 
//定义路由
global.Login = Loadable({
	loader: () => import('@/views/Login/index'),
	loading: Loading,
});
global.MainPage = Loadable({
	loader: () => import('@/views/Admin'),
	loading: Loading,
});
//AloneTable
global.AloneTable = Loadable({
	loader: () => import('@/page/AloneTable'),
	loading: Loading,
});
//表单
global.FromDemo = Loadable({
	loader: () => import('@/page/General/FromDemo/index'),
	loading: Loading,
});
//网络请求
global.HttpDemo= Loadable({
	loader: () => import('@/page/HttpDemo/index'),
	loading: Loading,
});
//弹框提醒
global.Alert = Loadable({
	loader: () => import('@/page/AlertDemo/index'),
	loading: Loading,
});
//表格
global.Table = Loadable({
	loader: () => import('@/page/TableDemo/index'),
	loading: Loading,
});
//树状图
global.TreeDemo = Loadable({
	loader: () => import('@/page/TreeDemo/index'),
	loading: Loading,
});
